new Vue({
    el: '#resume',
    data: {
        img: 'http://oss.youji999.top/images/2020/05/27/15905639331705617.png',
        name: '戴林峰',
        email: 'dailinfeng66@163.com',
        phone: '13734905487',
        jobtimes: '2019-10',
        job: '求职意向：前端工程师',
        salaryname: '薪资',
        salary: '10.5~12.5',
        jobtimesale: '',
        education_ba: '教育背景',
        education: [{
            school: '成都信息工程大学',
            region: '成都',
            time: '2017-2021',
            degree: '学士',
            professional: '软件工程专业',
            course: '本科',
        }],
        work_experience: '工作经历',
        work_info: [],
        project_experience: '项目经历',
        project_info: [{
                id: '7',
                projuct_name: '萤火校园',
                name: '商业项目',
                job_position: 'Web前端开发,web后端开发,QQ机器人开发',
                times: '2020.1~2020.至今',
                values: [{
                    info: '开发:开发后台管理平台的前端以及后台,开发QQ机器人',
                }, {
                    info: '完成状态: 迭代开发第二版等',
                }],
                describe: '使用公司：个人组织。',
            }, {
                id: '6',
                projuct_name: '武侯智慧消防平台',
                name: '商业项目',
                job_position: 'Web前端开发',
                times: '2019.10~2020.3',
                values: [{
                    info: '前期开发:熟悉平台需求,熟悉前人代码等',
                }, {
                    info: '后期开发: 根据需求以及UI切图,实现页面布局以及动态交互。',
                }, {
                    info: '完成状态: 迭代开发第二版等',
                }],
                describe: '使用公司：学校实验室。',
            },
            {
                id: '5',
                projuct_name: '法典在线学习网',
                name: '学习项目',
                job_position: 'Web前端开发,web后端开发',
                times: '2018.3~2018.7',
                values: [{
                    info: '开发: 根据UI切图,实现页面布局以及部分动态交互。实现后台逻辑,以及接口设计。',
                }],
                describe: '工作地点：成都信息工程大学。',
            }

        ],
        person_product: '个人项目',
        person_info: [{
            id: '1',
            name: '学生成绩管理系统',
            job_position: '全站开发',
            times: '2018.11~2018.11',
            info: '使用JSP/mysql',
        }, {
            id: '2',
            name: '电商网站爬取',
            job_position: '全站开发',
            times: '2020.3~2020.3',
            info: '使用Python/mysql/SpringBoot/Vue/Element-Ui',
        }, {
            id: '3',
            name: 'hbase可视化操作网站',
            job_position: '全站开发',
            times: '2020.6~2020.6',
            info: '使用hbase/SpringBoot/Vue/Element-Ui',
        }],
        skills: '技能',
        skills_info: [{
                id: '1',
                name: '语言',
                language: 'HTML(5)/CSS(3)/Javascript/Java/Python',
            },
            {
                id: '3',
                name: '框架',
                language: 'SpringCloud/SpringBoot/Nacos/Mybatis/Vue',
            },
            {
                id: '4',
                name: '数据库',
                language: 'MySql/MongoDB/Oracle',
            },
            {
                id: '5',
                name: '后台工具 ',
                language: 'IDEA/Eclipse',
            }
        ],
        other: '其他',
        other_list: [{
                id: '1',
                name: 'gitee',
                language: 'https://gitee.com/dlfdd',
            },
            {
                id: '2',
                name: 'CSDN博客',
                language: 'https://blog.csdn.net/qq_39992641',
            }
        ]
    },
    methods: {
        date: function(data) {
            var jobdate = this.jobtime(data, this.start());
            this.jobtimesale = jobdate;
            return jobdate;
        },
        start: function() {
            var date = new Date();
            var y = date.getFullYear();
            var m = date.getMonth() + 1;
            var d = date.getDate();
            if (d >= 15) {
                m = m + 1;
            }
            if (m > 12) {
                y = y + 1;
                m = m - 12;
            }
            m = m < 10 ? ('0' + m) : m;


            return y + '-' + m;
        },
        jobtime: function(start, end) {
            var staryear = start.split('-'),
                endyear = end.split('-');
            var month = '',
                year = '';
            if (endyear[1] - staryear[1] < 0) {
                endyear[0] = endyear[0] - 1;
                month = Number(endyear[1]) + 12 - Number(staryear[1]);
            } else {
                month = endyear[1] - staryear[1];
            }
            year = endyear[0] - staryear[0];
            return year + '年' + month + '月';
        },
        salarys: function(data) {
            var salar = data.split('~');
            let start = Number(salar[0]),
                end = Number(salar[1])
            let year = Number(this.jobtimesale.split('年')[0]),
                month = Number(this.jobtimesale.split('年')[1].split('月')[0]);
            if (year >= 2) {
                let syear = year - 1;
                start += syear + 2;
                end += syear + 2;
            }
            if (month > 6) {
                let smonth = (month) / 3;
                start += smonth * 0.5;
                end += smonth * 0.5;
            }
            return start.toFixed(1) + '~' + end.toFixed(1);
        }
    }
})